#内部调用，测试是否有同id
$execute if data entity @s Inventory[{Slot:8b}].components."minecraft:custom_data".bag[{id:"$(id)"}] run return 1